package ch.cm.android.teamlearn.gcm;

import ch.cm.android.teamlearn.MainScreen;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import android.support.v4.app.NotificationCompat;

public class NotificationMaker {

    public void makeCoolNotification(int drawable, String TitleText, String text, Context context) {
       NotificationManager notificationManager = (NotificationManager) context
                .getSystemService(Context.NOTIFICATION_SERVICE);
        
        PendingIntent contentIntent = PendingIntent.getActivity(context, 0, 
                new Intent(context, MainScreen.class), 0);
        
        NotificationCompat.Builder builder =
                new NotificationCompat.Builder(context)
        .setSmallIcon(drawable)
        .setContentTitle(TitleText)
        .setStyle(new NotificationCompat.BigTextStyle()
        .bigText(text))
        .setAutoCancel(true);
        
        builder.setContentIntent(contentIntent);
        notificationManager.notify(0, builder.build());
    }
}
